

<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
  <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>pymatgen.transformations package &mdash; pymatgen 2025.6.14 documentation</title>
      <link rel="stylesheet" type="text/css" href="assets/pygments.css?v=03e43079" />
      <link rel="stylesheet" type="text/css" href="assets/css/theme.css?v=e59714d7" />
      <link rel="stylesheet" type="text/css" href="assets/css/custom.css" />

  
    <link rel="canonical" href="https://pymatgen.orgpymatgen.transformations.html"/>
      <script src="assets/jquery.js?v=5d32c60e"></script>
      <script src="assets/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
      <script src="assets/documentation_options.js?v=03bec786"></script>
      <script src="assets/doctools.js?v=9bcbadda"></script>
      <script src="assets/sphinx_highlight.js?v=dc90522c"></script>
      <script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
    <script src="assets/js/theme.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" >

          
          
          <a href="index.html">
            
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <!-- Local TOC -->
              <div class="local-toc"><ul>
<li><a class="reference internal" href="#">pymatgen.transformations package</a><ul>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-pymatgen.transformations.advanced_transformations">pymatgen.transformations.advanced_transformations module</a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.AddAdsorbateTransformation"><code class="docutils literal notranslate"><span class="pre">AddAdsorbateTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.AddAdsorbateTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">AddAdsorbateTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.AddAdsorbateTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">AddAdsorbateTransformation.is_one_to_many</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.ChargeBalanceTransformation"><code class="docutils literal notranslate"><span class="pre">ChargeBalanceTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.ChargeBalanceTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">ChargeBalanceTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.CubicSupercellTransformation"><code class="docutils literal notranslate"><span class="pre">CubicSupercellTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.CubicSupercellTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">CubicSupercellTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.CubicSupercellTransformation.check_constraints"><code class="docutils literal notranslate"><span class="pre">CubicSupercellTransformation.check_constraints()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.CubicSupercellTransformation.check_exceptions"><code class="docutils literal notranslate"><span class="pre">CubicSupercellTransformation.check_exceptions()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.CubicSupercellTransformation.get_possible_supercell"><code class="docutils literal notranslate"><span class="pre">CubicSupercellTransformation.get_possible_supercell()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.DisorderOrderedTransformation"><code class="docutils literal notranslate"><span class="pre">DisorderOrderedTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.DisorderOrderedTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">DisorderOrderedTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.DisorderOrderedTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">DisorderOrderedTransformation.is_one_to_many</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.DopingTransformation"><code class="docutils literal notranslate"><span class="pre">DopingTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.DopingTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">DopingTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.DopingTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">DopingTransformation.is_one_to_many</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.EnumerateStructureTransformation"><code class="docutils literal notranslate"><span class="pre">EnumerateStructureTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.EnumerateStructureTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">EnumerateStructureTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.EnumerateStructureTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">EnumerateStructureTransformation.is_one_to_many</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.GrainBoundaryTransformation"><code class="docutils literal notranslate"><span class="pre">GrainBoundaryTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.GrainBoundaryTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">GrainBoundaryTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.MagOrderParameterConstraint"><code class="docutils literal notranslate"><span class="pre">MagOrderParameterConstraint</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.MagOrderParameterConstraint.satisfies_constraint"><code class="docutils literal notranslate"><span class="pre">MagOrderParameterConstraint.satisfies_constraint()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.MagOrderingTransformation"><code class="docutils literal notranslate"><span class="pre">MagOrderingTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.MagOrderingTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">MagOrderingTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.MagOrderingTransformation.determine_min_cell"><code class="docutils literal notranslate"><span class="pre">MagOrderingTransformation.determine_min_cell()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.MagOrderingTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">MagOrderingTransformation.is_one_to_many</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.MonteCarloRattleTransformation"><code class="docutils literal notranslate"><span class="pre">MonteCarloRattleTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.MonteCarloRattleTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">MonteCarloRattleTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.MultipleSubstitutionTransformation"><code class="docutils literal notranslate"><span class="pre">MultipleSubstitutionTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.MultipleSubstitutionTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">MultipleSubstitutionTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.MultipleSubstitutionTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">MultipleSubstitutionTransformation.is_one_to_many</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SQSTransformation"><code class="docutils literal notranslate"><span class="pre">SQSTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SQSTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">SQSTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SQSTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">SQSTransformation.is_one_to_many</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SlabTransformation"><code class="docutils literal notranslate"><span class="pre">SlabTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SlabTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">SlabTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SubstituteSurfaceSiteTransformation"><code class="docutils literal notranslate"><span class="pre">SubstituteSurfaceSiteTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SubstituteSurfaceSiteTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">SubstituteSurfaceSiteTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SubstituteSurfaceSiteTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">SubstituteSurfaceSiteTransformation.is_one_to_many</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SubstitutionPredictorTransformation"><code class="docutils literal notranslate"><span class="pre">SubstitutionPredictorTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SubstitutionPredictorTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">SubstitutionPredictorTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SubstitutionPredictorTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">SubstitutionPredictorTransformation.is_one_to_many</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SuperTransformation"><code class="docutils literal notranslate"><span class="pre">SuperTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SuperTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">SuperTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.SuperTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">SuperTransformation.is_one_to_many</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.advanced_transformations.find_codopant"><code class="docutils literal notranslate"><span class="pre">find_codopant()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.transformations.site_transformations">pymatgen.transformations.site_transformations module</a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.AddSitePropertyTransformation"><code class="docutils literal notranslate"><span class="pre">AddSitePropertyTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.AddSitePropertyTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">AddSitePropertyTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.InsertSitesTransformation"><code class="docutils literal notranslate"><span class="pre">InsertSitesTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.InsertSitesTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">InsertSitesTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSitesTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.ALGO_BEST_FIRST"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSitesTransformation.ALGO_BEST_FIRST</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.ALGO_COMPLETE"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSitesTransformation.ALGO_COMPLETE</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.ALGO_ENUMERATE"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSitesTransformation.ALGO_ENUMERATE</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.ALGO_FAST"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSitesTransformation.ALGO_FAST</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSitesTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSitesTransformation.is_one_to_many</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.RadialSiteDistortionTransformation"><code class="docutils literal notranslate"><span class="pre">RadialSiteDistortionTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.RadialSiteDistortionTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">RadialSiteDistortionTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.RadialSiteDistortionTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">RadialSiteDistortionTransformation.is_one_to_many</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.RadialSiteDistortionTransformation.use_multiprocessing"><code class="docutils literal notranslate"><span class="pre">RadialSiteDistortionTransformation.use_multiprocessing</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.RemoveSitesTransformation"><code class="docutils literal notranslate"><span class="pre">RemoveSitesTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.RemoveSitesTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">RemoveSitesTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.ReplaceSiteSpeciesTransformation"><code class="docutils literal notranslate"><span class="pre">ReplaceSiteSpeciesTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.ReplaceSiteSpeciesTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">ReplaceSiteSpeciesTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.TranslateSitesTransformation"><code class="docutils literal notranslate"><span class="pre">TranslateSitesTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.TranslateSitesTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">TranslateSitesTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.TranslateSitesTransformation.as_dict"><code class="docutils literal notranslate"><span class="pre">TranslateSitesTransformation.as_dict()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.site_transformations.TranslateSitesTransformation.inverse"><code class="docutils literal notranslate"><span class="pre">TranslateSitesTransformation.inverse</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.transformations.standard_transformations">pymatgen.transformations.standard_transformations module</a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.AutoOxiStateDecorationTransformation"><code class="docutils literal notranslate"><span class="pre">AutoOxiStateDecorationTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.AutoOxiStateDecorationTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">AutoOxiStateDecorationTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.ChargedCellTransformation"><code class="docutils literal notranslate"><span class="pre">ChargedCellTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.ChargedCellTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">ChargedCellTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.ChargedCellTransformation.inverse"><code class="docutils literal notranslate"><span class="pre">ChargedCellTransformation.inverse</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.ConventionalCellTransformation"><code class="docutils literal notranslate"><span class="pre">ConventionalCellTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.ConventionalCellTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">ConventionalCellTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.DeformStructureTransformation"><code class="docutils literal notranslate"><span class="pre">DeformStructureTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.DeformStructureTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">DeformStructureTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.DeformStructureTransformation.inverse"><code class="docutils literal notranslate"><span class="pre">DeformStructureTransformation.inverse</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.DiscretizeOccupanciesTransformation"><code class="docutils literal notranslate"><span class="pre">DiscretizeOccupanciesTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.DiscretizeOccupanciesTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">DiscretizeOccupanciesTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation"><code class="docutils literal notranslate"><span class="pre">OrderDisorderedStructureTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.ALGO_BEST_FIRST"><code class="docutils literal notranslate"><span class="pre">OrderDisorderedStructureTransformation.ALGO_BEST_FIRST</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.ALGO_COMPLETE"><code class="docutils literal notranslate"><span class="pre">OrderDisorderedStructureTransformation.ALGO_COMPLETE</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.ALGO_FAST"><code class="docutils literal notranslate"><span class="pre">OrderDisorderedStructureTransformation.ALGO_FAST</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.ALGO_RANDOM"><code class="docutils literal notranslate"><span class="pre">OrderDisorderedStructureTransformation.ALGO_RANDOM</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">OrderDisorderedStructureTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">OrderDisorderedStructureTransformation.is_one_to_many</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.lowest_energy_structure"><code class="docutils literal notranslate"><span class="pre">OrderDisorderedStructureTransformation.lowest_energy_structure</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.OxidationStateDecorationTransformation"><code class="docutils literal notranslate"><span class="pre">OxidationStateDecorationTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.OxidationStateDecorationTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">OxidationStateDecorationTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.OxidationStateRemovalTransformation"><code class="docutils literal notranslate"><span class="pre">OxidationStateRemovalTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.OxidationStateRemovalTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">OxidationStateRemovalTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSpecieTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.ALGO_BEST_FIRST"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSpecieTransformation.ALGO_BEST_FIRST</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.ALGO_COMPLETE"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSpecieTransformation.ALGO_COMPLETE</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.ALGO_ENUMERATE"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSpecieTransformation.ALGO_ENUMERATE</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.ALGO_FAST"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSpecieTransformation.ALGO_FAST</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSpecieTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">PartialRemoveSpecieTransformation.is_one_to_many</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.PerturbStructureTransformation"><code class="docutils literal notranslate"><span class="pre">PerturbStructureTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.PerturbStructureTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">PerturbStructureTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.PrimitiveCellTransformation"><code class="docutils literal notranslate"><span class="pre">PrimitiveCellTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.PrimitiveCellTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">PrimitiveCellTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.RemoveSpeciesTransformation"><code class="docutils literal notranslate"><span class="pre">RemoveSpeciesTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.RemoveSpeciesTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">RemoveSpeciesTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.RotationTransformation"><code class="docutils literal notranslate"><span class="pre">RotationTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.RotationTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">RotationTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.RotationTransformation.inverse"><code class="docutils literal notranslate"><span class="pre">RotationTransformation.inverse</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.ScaleToRelaxedTransformation"><code class="docutils literal notranslate"><span class="pre">ScaleToRelaxedTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.ScaleToRelaxedTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">ScaleToRelaxedTransformation.apply_transformation()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.SubstitutionTransformation"><code class="docutils literal notranslate"><span class="pre">SubstitutionTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.SubstitutionTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">SubstitutionTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.SubstitutionTransformation.inverse"><code class="docutils literal notranslate"><span class="pre">SubstitutionTransformation.inverse</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.SupercellTransformation"><code class="docutils literal notranslate"><span class="pre">SupercellTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.SupercellTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">SupercellTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.SupercellTransformation.from_boundary_distance"><code class="docutils literal notranslate"><span class="pre">SupercellTransformation.from_boundary_distance()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.SupercellTransformation.from_scaling_factors"><code class="docutils literal notranslate"><span class="pre">SupercellTransformation.from_scaling_factors()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.SupercellTransformation.inverse"><code class="docutils literal notranslate"><span class="pre">SupercellTransformation.inverse</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#pymatgen.transformations.standard_transformations.get_randomly_manipulated_structures"><code class="docutils literal notranslate"><span class="pre">get_randomly_manipulated_structures()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-pymatgen.transformations.transformation_abc">pymatgen.transformations.transformation_abc module</a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a><ul>
<li><a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation.apply_transformation"><code class="docutils literal notranslate"><span class="pre">AbstractTransformation.apply_transformation()</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation.inverse"><code class="docutils literal notranslate"><span class="pre">AbstractTransformation.inverse</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation.is_one_to_many"><code class="docutils literal notranslate"><span class="pre">AbstractTransformation.is_one_to_many</span></code></a></li>
<li><a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation.use_multiprocessing"><code class="docutils literal notranslate"><span class="pre">AbstractTransformation.use_multiprocessing</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu"  style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">pymatgen</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content style-external-links">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
      <li class="breadcrumb-item active">pymatgen.transformations package</li>
      <li class="wy-breadcrumbs-aside">
              <a href="https://github.com/materialsproject/pymatgen/blob/master/docs_rst/pymatgen.transformations.rst" class="fa fa-github"> Edit on GitHub</a>
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="module-pymatgen.transformations">
<span id="pymatgen-transformations-package"></span><h1>pymatgen.transformations package<a class="headerlink" href="#module-pymatgen.transformations" title="Link to this heading"></a></h1>
<p>The transformations package defines various transformations that can be applied
on structures, i.e., converting one structure to another.</p>
<section id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Link to this heading"></a></h2>
</section>
<section id="module-pymatgen.transformations.advanced_transformations">
<span id="pymatgen-transformations-advanced-transformations-module"></span><h2>pymatgen.transformations.advanced_transformations module<a class="headerlink" href="#module-pymatgen.transformations.advanced_transformations" title="Link to this heading"></a></h2>
<p>This module implements more advanced transformations.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.AddAdsorbateTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">AddAdsorbateTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">adsorbate</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">selective_dynamics</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.9</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mi_vec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">repeat</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_lw</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">5.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">reorient</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">find_args</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1644-L1724"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.AddAdsorbateTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Create adsorbate structures.</p>
<p>Use AdsorbateSiteFinder to add an adsorbate to a slab.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>adsorbate</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Molecule" title="pymatgen.core.structure.Molecule"><em>Molecule</em></a>) – molecule to add as adsorbate</p></li>
<li><p><strong>selective_dynamics</strong> (<em>bool</em>) – flag for whether to assign
non-surface sites as fixed for selective dynamics</p></li>
<li><p><strong>height</strong> (<em>float</em>) – height criteria for selection of surface sites</p></li>
<li><p><strong>mi_vec</strong> – vector corresponding to the vector
concurrent with the miller index, this enables use with
slabs that have been reoriented, but the miller vector
must be supplied manually</p></li>
<li><p><strong>repeat</strong> (<em>3-tuple</em><em> or </em><em>list</em>) – repeat argument for supercell generation</p></li>
<li><p><strong>min_lw</strong> (<em>float</em>) – minimum length and width of the slab, only used
if repeat is None</p></li>
<li><p><strong>translate</strong> (<em>bool</em>) – flag on whether to translate the molecule so
that its CoM is at the origin prior to adding it to the surface</p></li>
<li><p><strong>reorient</strong> (<em>bool</em>) – flag on whether or not to reorient adsorbate
along the miller index</p></li>
<li><p><strong>find_args</strong> (<em>dict</em>) – dictionary of arguments to be passed to the
call to self.find_adsorption_sites, e.g. {“distance”:2.0}</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.AddAdsorbateTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1690-L1719"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.AddAdsorbateTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – Must be a Slab structure</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – <p>If return_ranked_list is int, that number of structures.</p>
<p>is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>with adsorbate</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="pymatgen.core.html#pymatgen.core.surface.Slab" title="pymatgen.core.surface.Slab">Slab</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.AddAdsorbateTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="k"><span class="pre">True</span></span><span class="p"><span class="pre">]</span></span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/advanced_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.AddAdsorbateTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.ChargeBalanceTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">ChargeBalanceTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">charge_balance_sp</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L59-L92"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.ChargeBalanceTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This is a transformation that disorders a structure to make it charge
balanced, given an oxidation state-decorated structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>charge_balance_sp</strong> – specie to add or remove. Currently only removal
is supported.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.ChargeBalanceTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L75-L92"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.ChargeBalanceTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Charge balanced structure.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.CubicSupercellTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">CubicSupercellTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">min_atoms</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_atoms</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_length</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">15.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_length</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">force_diagonal</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">force_90_degrees</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allow_orthorhombic</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle_tolerance</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.001</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">step_size</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.1</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1441-L1641"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.CubicSupercellTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>A transformation that aims to generate a nearly cubic supercell structure
from a structure.</p>
<p>The algorithm solves for a transformation matrix that makes the supercell
cubic. The matrix must have integer entries, so entries are rounded (in such
a way that forces the matrix to be non-singular). From the supercell
resulting from this transformation matrix, vector projections are used to
determine the side length of the largest cube that can fit inside the
supercell. The algorithm will iteratively increase the size of the supercell
until the largest inscribed cube’s side length is at least ‘min_length’
and the number of atoms in the supercell falls in the range
<code class="docutils literal notranslate"><span class="pre">min_atoms</span> <span class="pre">&lt;</span> <span class="pre">n</span> <span class="pre">&lt;</span> <span class="pre">max_atoms</span></code>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>max_atoms</strong> – Maximum number of atoms allowed in the supercell.</p></li>
<li><p><strong>min_atoms</strong> – Minimum number of atoms allowed in the supercell.</p></li>
<li><p><strong>min_length</strong> – Minimum length of the smallest supercell lattice vector.</p></li>
<li><p><strong>max_length</strong> – Maximum length of the larger supercell lattice vector.</p></li>
<li><p><strong>force_diagonal</strong> – If True, return a transformation with a diagonal
transformation matrix.</p></li>
<li><p><strong>force_90_degrees</strong> – If True, return a transformation for a supercell
with 90 degree angles (if possible). To avoid long run times,
please use max_atoms or max_length</p></li>
<li><p><strong>allow_orthorhombic</strong> – Instead of a cubic cell, also orthorhombic cells
are allowed. max_length is required for this option.</p></li>
<li><p><strong>angle_tolerance</strong> – tolerance to determine the 90 degree angles.</p></li>
<li><p><strong>step_size</strong> (<em>float</em>) – step_size which is used to increase the supercell.
If allow_orthorhombic and force_90_degrees is both set to True,
the chosen step_size will be automatically multiplied by 5 to
prevent a too long search for the possible supercell.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.CubicSupercellTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1498-L1571"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.CubicSupercellTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>The algorithm solves for a transformation matrix that makes the
supercell cubic. The matrix must have integer entries, so entries are
rounded (in such a way that forces the matrix to be non-singular). From
the supercell resulting from this transformation matrix, vector
projections are used to determine the side length of the largest cube
that can fit inside the supercell. The algorithm will iteratively
increase the size of the supercell until the largest inscribed cube’s
side length is at least ‘num_nn_dists’ times the nearest neighbor
distance and the number of atoms in the supercell falls in the range
defined by min_atoms and max_atoms.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>Transformed supercell.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p>supercell</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.CubicSupercellTransformation.check_constraints">
<span class="sig-name descname"><span class="pre">check_constraints</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">length_vecs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">n_atoms</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">superstructure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1584-L1601"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.CubicSupercellTransformation.check_constraints" title="Link to this definition"></a></dt>
<dd><p>Check if the supercell constraints are met.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>bool</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.CubicSupercellTransformation.check_exceptions">
<span class="sig-name descname"><span class="pre">check_exceptions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">length_vecs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">n_atoms</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1573-L1582"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.CubicSupercellTransformation.check_exceptions" title="Link to this definition"></a></dt>
<dd><p>Check supercell exceptions.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.CubicSupercellTransformation.get_possible_supercell">
<em class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_possible_supercell</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">lat_vecs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">structure</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_sc_lat_vecs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1603-L1641"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.CubicSupercellTransformation.get_possible_supercell" title="Link to this definition"></a></dt>
<dd><p>Get the supercell possible with the set conditions.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>length_vecs, n_atoms, superstructure, transformation_matrix</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.DisorderOrderedTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">DisorderOrderedTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">max_sites_to_merge</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1210-L1325"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.DisorderOrderedTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Not to be confused with OrderDisorderedTransformation,
this transformation attempts to obtain a
<em>disordered</em> structure from an input ordered structure.
This may or may not be physically plausible, further
inspection of the returned structures is advised.
The main purpose for this transformation is for structure
matching to crystal prototypes for structures that have
been derived from a parent prototype structure by
substitutions or alloying additions.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>max_sites_to_merge</strong> – only merge this number of sites together.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.DisorderOrderedTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1229-L1258"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.DisorderOrderedTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – ordered structure</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – <p>If return_ranked_list is int, that number of structures.</p>
<p>is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Transformed disordered structure(s)</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.DisorderOrderedTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="k"><span class="pre">True</span></span><span class="p"><span class="pre">]</span></span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/advanced_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.DisorderOrderedTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.DopingTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">DopingTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dopant</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ionic_radius_tol</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">inf</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_length</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">alio_tol</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">codopant</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_structures_per_enum</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">100</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allowed_doping_species</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L939-L1135"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.DopingTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>A transformation that performs doping of a structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>dopant</strong> (<em>Species-like</em>) – e.g. Al3+. Must have oxidation state.</p></li>
<li><p><strong>ionic_radius_tol</strong> (<em>float</em>) – e.g. Fractional allowable ionic radii
mismatch for dopant to fit into a site. Default of inf means
that any dopant with the right oxidation state is allowed.</p></li>
<li><p><strong>min_length</strong> (<em>float</em>) – Min. lattice parameter between periodic
images of dopant. Defaults to 10A for now.</p></li>
<li><p><strong>alio_tol</strong> (<em>int</em>) – If this is not 0, attempt will be made to dope
sites with oxidation_states +- alio_tol of the dopant. e.g.
1 means that the ions like Ca2+ and Ti4+ are considered as
potential doping sites for Al3+.</p></li>
<li><p><strong>codopant</strong> (<em>bool</em>) – If True, doping will be carried out with a
codopant to maintain charge neutrality. Otherwise, vacancies
will be used.</p></li>
<li><p><strong>max_structures_per_enum</strong> (<em>float</em>) – Maximum number of structures to
return per enumeration. Note that there can be more than one
candidate doping site, and each site enumeration will return at
max max_structures_per_enum structures. Defaults to 100.</p></li>
<li><p><strong>allowed_doping_species</strong> (<em>list</em>) – Species that are allowed to be
doping sites. This is an inclusionary list. If specified,
any sites which are not</p></li>
<li><p><strong>**kwargs</strong> – Same keyword args as EnumerateStructureTransformation,
i.e., min_cell_size, etc.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.DopingTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L988-L1130"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.DopingTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input structure to dope.</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – If is int, that number of structures is returned.
If False, only the single lowest energy structure is returned. Defaults to False.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>each dict as {“structure”: Structure, “energy”: float}.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>list[dict] | <a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure">Structure</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.DopingTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="k"><span class="pre">True</span></span><span class="p"><span class="pre">]</span></span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/advanced_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.DopingTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.EnumerateStructureTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">EnumerateStructureTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">min_cell_size</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_cell_size</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">symm_prec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">refine_structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum_precision_parameter</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.001</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">check_ordered_symmetry</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_disordered_sites</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sort_criteria</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">Callable</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'ewald'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">timeout</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">n_jobs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">-1</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L246-L478"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.EnumerateStructureTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Order a disordered structure using enumlib. For complete orderings, this
generally produces fewer structures that the OrderDisorderedStructure
transformation, and at a much faster speed.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>min_cell_size</strong> – The minimum cell size wanted. Must be an int. Defaults to 1.</p></li>
<li><p><strong>max_cell_size</strong> – The maximum cell size wanted. Must be an int. Defaults to 1.</p></li>
<li><p><strong>symm_prec</strong> – Tolerance to use for symmetry.</p></li>
<li><p><strong>refine_structure</strong> – This parameter has the same meaning as in enumlib_caller.
If you are starting from a structure that has been relaxed via
some electronic structure code, it is usually much better to
start with symmetry determination and then obtain a refined
structure. The refined structure have cell parameters and
atomic positions shifted to the expected symmetry positions,
which makes it much less sensitive precision issues in enumlib.
If you are already starting from an experimental cif, refinement
should have already been done and it is not necessary. Defaults
to False.</p></li>
<li><p><strong>enum_precision_parameter</strong> (<em>float</em>) – Finite precision parameter for
enumlib. Default of 0.001 is usually ok, but you might need to
tweak it for certain cells.</p></li>
<li><p><strong>check_ordered_symmetry</strong> (<em>bool</em>) – Whether to check the symmetry of
the ordered sites. If the symmetry of the ordered sites is
lower, the lowest symmetry ordered sites is included in the
enumeration. This is important if the ordered sites break
symmetry in a way that is important getting possible
structures. But sometimes including ordered sites
slows down enumeration to the point that it cannot be
completed. Switch to False in those cases. Defaults to True.</p></li>
<li><p><strong>max_disordered_sites</strong> (<em>int</em>) – An alternate parameter to max_cell size. Will sequentially try
larger and larger cell sizes until (i) getting a result or (ii)
the number of disordered sites in the cell exceeds
max_disordered_sites. Must set max_cell_size to None when using
this parameter.</p></li>
<li><p><strong>sort_criteria</strong> (<em>str</em><em> or </em><em>callable</em>) – Sort by Ewald energy (“ewald”, must have oxidation states and slow) or
M3GNet relaxed energy (“m3gnet_relax”, which is the most accurate but most expensive and provides
pre-relaxed structures - needs m3gnet package installed) or by M3GNet static energy (“m3gnetassets”)
or by number of sites (“nsites”, the fastest, the default). The expense of m3gnet_relax or m3gnetassets
can be worth it if it significantly reduces the number of structures to be considered. m3gnet_relax
speeds up the subsequent DFT calculations. Alternatively, a callable can be supplied that returns a
(Structure, energy) tuple.</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – timeout in minutes to pass to EnumlibAdaptor.</p></li>
<li><p><strong>n_jobs</strong> (<em>int</em>) – Number of parallel jobs used to compute energy criteria. This is used only when the Ewald
or m3gnet or callable sort_criteria is used. Default is -1, which uses all available CPUs.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.EnumerateStructureTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">dict</span><span class="p"><span class="pre">]</span></span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L329-L473"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.EnumerateStructureTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Get either a single ordered structure or a sequence of all ordered
structures.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – Structure to order.</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – <p>If return_ranked_list is int, that number of structures</p>
<p>is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><p>Depending on returned_ranked list, either a transformed structure
or a list of dictionaries, where each dictionary is of the form
{“structure” = …. , “other_arguments”}</p>
<p>The list of ordered structures is ranked by Ewald energy / atom, if
the input structure is an oxidation state decorated structure.
Otherwise, it is ranked by number of sites, with smallest number of
sites first.</p>
</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.EnumerateStructureTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="k"><span class="pre">True</span></span><span class="p"><span class="pre">]</span></span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/advanced_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.EnumerateStructureTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.GrainBoundaryTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">GrainBoundaryTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rotation_axis</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rotation_angle</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expand_times</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">4</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vacuum_thickness</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ab_shift</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">normal</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ratio</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">plane</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_search</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">20</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tol_coi</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-08</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rm_ratio</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.7</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">quick_gen</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1328-L1438"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.GrainBoundaryTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>A transformation that creates a gb from a bulk structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>rotation_axis</strong> (<em>list</em>) – Rotation axis of GB in the form of a list of integer
e.g.: [1, 1, 0]</p></li>
<li><p><strong>rotation_angle</strong> (<em>float</em><em>, </em><em>in unit</em><em> of </em><em>degree</em>) – rotation angle used to generate GB.
Make sure the angle is accurate enough. You can use the enum* functions
in this class to extract the accurate angle.
e.g.: The rotation angle of sigma 3 twist GB with the rotation axis
[1, 1, 1] and GB plane (1, 1, 1) can be 60.000000000 degree.
If you do not know the rotation angle, but know the sigma value, we have
provide the function get_rotation_angle_from_sigma which is able to return
all the rotation angles of sigma value you provided.</p></li>
<li><p><strong>expand_times</strong> (<em>int</em>) – The multiple times used to expand one unit grain to larger grain.
This is used to tune the grain length of GB to warrant that the two GBs in one
cell do not interact with each other. Default set to 4.</p></li>
<li><p><strong>vacuum_thickness</strong> (<em>float</em>) – The thickness of vacuum that you want to insert between
two grains of the GB. Default to 0.</p></li>
<li><p><strong>ab_shift</strong> (<em>tuple</em><em>[</em><em>float</em><em>, </em><em>float</em><em>]</em>) – in plane shift of two grains in unit of a, b vectors of Gb</p></li>
<li><p><strong>normal</strong> (<em>logic</em>) – determine if need to require the c axis of top grain (first transformation matrix)
perpendicular to the surface or not.
default to false.</p></li>
<li><p><strong>ratio</strong> (<em>list</em><em> of </em><em>integers</em>) – <p>lattice axial ratio.
If True, will try to determine automatically from structure.
For cubic system, ratio is not needed and can be set to None.
For tetragonal system, ratio = [mu, mv], list of two integers,
that is, mu/mv = c2/a2. If it is irrational, set it to None.
For orthorhombic system, ratio = [mu, lam, mv], list of three integers,</p>
<blockquote>
<div><p>that is, mu:lam:mv = c2:b2:a2. If irrational for one axis, set it to None.</p>
</div></blockquote>
<p>e.g. mu:lam:mv = c2,None,a2, means b2 is irrational.
For rhombohedral system, ratio = [mu, mv], list of two integers,
that is, mu/mv is the ratio of (1+2*cos(alpha))/cos(alpha).
If irrational, set it to None.
For hexagonal system, ratio = [mu, mv], list of two integers,
that is, mu/mv = c2/a2. If it is irrational, set it to none.</p>
</p></li>
<li><p><strong>plane</strong> (<em>list</em>) – Grain boundary plane in the form of a list of integers
e.g.: [1, 2, 3]. If none, we set it as twist GB. The plane will be perpendicular
to the rotation axis.</p></li>
<li><p><strong>max_search</strong> (<em>int</em>) – max search for the GB lattice vectors that give the smallest GB
lattice. If normal is true, also max search the GB c vector that perpendicular
to the plane. For complex GB, if you want to speed up, you can reduce this value.
But too small of this value may lead to error.</p></li>
<li><p><strong>tol_coi</strong> (<em>float</em>) – tolerance to find the coincidence sites. When making approximations to
the ratio needed to generate the GB, you probably need to increase this tolerance to
obtain the correct number of coincidence sites. To check the number of coincidence
sites are correct or not, you can compare the generated Gb object’s sigma with enum*
sigma values (what user expected by input).</p></li>
<li><p><strong>rm_ratio</strong> (<em>float</em>) – the criteria to remove the atoms which are too close with each other.
rm_ratio * bond_length of bulk system is the criteria of bond length, below which the atom
will be removed. Default to 0.7.</p></li>
<li><p><strong>quick_gen</strong> (<em>bool</em>) – whether to quickly generate a supercell, if set to true, no need to
find the smallest cell.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.GrainBoundaryTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1412-L1438"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.GrainBoundaryTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – Input Structure</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – If return_ranked_list is int, that number of structures
is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Grain boundary Structures.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.MagOrderParameterConstraint">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MagOrderParameterConstraint</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">order_parameter</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">species_constraints</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">site_constraint_name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">site_constraints</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L541-L604"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.MagOrderParameterConstraint" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">MSONable</span></code></p>
<p>This class can be used to supply MagOrderingTransformation
to just a specific subset of species or sites that satisfy the
provided constraints. This can be useful for setting an order
parameters for, for example, ferrimagnetic structures which
might order on certain motifs, with the global order parameter
dependent on how many sites satisfy that motif.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>order_parameter</strong> (<em>float</em>) – any number from 0.0 to 1.0,
typically 0.5 (antiferromagnetic) or 1.0 (ferromagnetic)</p></li>
<li><p><strong>species_constraints</strong> (<em>list</em>) – str or list of strings
of Species symbols that the constraint should apply to</p></li>
<li><p><strong>site_constraint_name</strong> (<em>str</em>) – name of the site property
that the constraint should apply to, e.g. “coordination_no”</p></li>
<li><p><strong>site_constraints</strong> (<em>list</em>) – list of values of the site
property that the constraints should apply to.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.MagOrderParameterConstraint.satisfies_constraint">
<span class="sig-name descname"><span class="pre">satisfies_constraint</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">site</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L593-L604"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.MagOrderParameterConstraint.satisfies_constraint" title="Link to this definition"></a></dt>
<dd><p>Check if a periodic site satisfies the constraint.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.MagOrderingTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MagOrderingTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mag_species_spin</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">order_parameter</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">energy_model</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L607-L901"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.MagOrderingTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This transformation takes a structure and returns a list of collinear
magnetic orderings. For disordered structures, make an ordered
approximation first.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>mag_species_spin</strong> – A mapping of elements/species to their
spin magnitudes, e.g. {“Fe3+”: 5, “Mn3+”: 4}</p></li>
<li><p><strong>order_parameter</strong> (<em>float</em><em> or </em><em>list</em>) – if float, a specifies a
global order parameter and can take values from 0.0 to 1.0
(e.g. 0.5 for antiferromagnetic or 1.0 for ferromagnetic), if
list has to be a list of
pymatgen.transformations.advanced_transformations.MagOrderParameterConstraint
to specify more complicated orderings, see documentation for
MagOrderParameterConstraint more details on usage</p></li>
<li><p><strong>energy_model</strong> – Energy model to rank the returned structures,
see :mod: <cite>pymatgen.analysis.energy_models</cite> for more information (note
that this is not necessarily a physical energy). By default, returned
structures use SymmetryModel() which ranks structures from most
symmetric to least.</p></li>
<li><p><strong>kwargs</strong> – Additional kwargs that are passed to
EnumerateStructureTransformation such as min_cell_size etc.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.MagOrderingTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">list</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L812-L896"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.MagOrderingTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply MagOrderTransformation to an input structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Any ordered structure.</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – If return_ranked_list is int, that number of structures
is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p></li>
</ul>
</dd>
<dt class="field-even">Raises<span class="colon">:</span></dt>
<dd class="field-even"><p><strong>ValueError</strong> – On disordered structures.</p>
</dd>
<dt class="field-odd">Returns<span class="colon">:</span></dt>
<dd class="field-odd"><p>Structure(s) after MagOrderTransformation.</p>
</dd>
<dt class="field-even">Return type<span class="colon">:</span></dt>
<dd class="field-even"><p><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure">Structure</a> | list[<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure">Structure</a>]</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.MagOrderingTransformation.determine_min_cell">
<em class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">determine_min_cell</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">disordered_structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L656-L690"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.MagOrderingTransformation.determine_min_cell" title="Link to this definition"></a></dt>
<dd><p>Determine the smallest supercell that is able to enumerate
the provided structure with the given order parameter.</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.MagOrderingTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="k"><span class="pre">True</span></span><span class="p"><span class="pre">]</span></span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/advanced_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.MagOrderingTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.MonteCarloRattleTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MonteCarloRattleTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rattle_std</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_distance</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">seed</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L2168-L2232"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.MonteCarloRattleTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Uses a Monte Carlo rattle procedure to randomly perturb the sites in a
structure.</p>
<p>This class requires the hiPhive package to be installed.</p>
<p>Rattling atom <cite>i</cite> is carried out as a Monte Carlo move that is accepted with
a probability determined from the minimum interatomic distance
<span class="math notranslate nohighlight">\(d_{ij}\)</span>. If <span class="math notranslate nohighlight">\(\\min(d_{ij})\)</span> is smaller than <span class="math notranslate nohighlight">\(d_{min}\)</span>
the move is only accepted with a low probability.</p>
<p>This process is repeated for each atom a number of times meaning
the magnitude of the final displacements is not <em>directly</em>
connected to <cite>rattle_std</cite>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>rattle_std</strong> – Rattle amplitude (standard deviation in normal
distribution). Note: this value is not <em>directly</em> connected to the
final average displacement for the structures</p></li>
<li><p><strong>min_distance</strong> – Interatomic distance used for computing the probability
for each rattle move.</p></li>
<li><p><strong>seed</strong> – Seed for setting up NumPy random state from which random numbers
are generated. If <code class="docutils literal notranslate"><span class="pre">None</span></code>, a random seed will be generated
(default). This option allows the output of this transformation
to be deterministic.</p></li>
<li><p><strong>**kwargs</strong> – Additional keyword arguments to be passed to the hiPhive
mc_rattle function.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.MonteCarloRattleTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L2212-L2232"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.MonteCarloRattleTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Structure with sites perturbed.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.MultipleSubstitutionTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MultipleSubstitutionTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sp_to_replace</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">r_fraction</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">substitution_dict</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">charge_balance_species</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">order</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L153-L243"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.MultipleSubstitutionTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Perform multiple substitutions on a structure. For example, can do a
fractional replacement of Ge in LiGePS with a list of species, creating one
structure for each substitution. Ordering is done using a dummy element so
only one ordering must be done per substitution oxidation state. Charge
balancing of the structure is optionally performed.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>There are no checks to make sure that removal fractions are possible and rounding
may occur. Currently charge balancing only works for removal of species.</p>
</div>
<p>Perform multiple fractional substitutions on a transmuter.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sp_to_replace</strong> – species to be replaced</p></li>
<li><p><strong>r_fraction</strong> – fraction of that specie to replace</p></li>
<li><p><strong>substitution_dict</strong> – dictionary of the format
{2: [“Mg”, “Ti”, “V”, “As”, “Cr”, “Ta”, “N”, “Nb”],
3: [“Ru”, “Fe”, “Co”, “Ce”, “As”, “Cr”, “Ta”, “N”, “Nb”],
4: [“Ru”, “V”, “Cr”, “Ta”, “N”, “Nb”],
5: [“Ru”, “W”, “Mn”]
}
The number is the charge used for each of the list of elements
(an element can be present in multiple lists)</p></li>
<li><p><strong>charge_balance_species</strong> – If specified, will balance the charge on
the structure using that specie.</p></li>
<li><p><strong>order</strong> – Whether to order the structures.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.MultipleSubstitutionTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L199-L238"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.MultipleSubstitutionTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – Input Structure</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – <p>If return_ranked_list is int, that number of structures</p>
<p>is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Structures with all substitutions applied.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.MultipleSubstitutionTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="k"><span class="pre">True</span></span><span class="p"><span class="pre">]</span></span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/advanced_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.MultipleSubstitutionTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SQSTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SQSTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">scaling</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cluster_size_and_shell</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">search_time</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">60</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">directory</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">instances</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">temperature</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wr</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wn</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">wd</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tol</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.001</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">icet_sqs_kwargs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">best_only</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">remove_duplicate_structures</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">reduction_algo</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="s"><span class="pre">'niggli'</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="s"><span class="pre">'LLL'</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'LLL'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sqs_method</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="s"><span class="pre">'mcsqs'</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="s"><span class="pre">'icet-enumeration'</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="s"><span class="pre">'icet-monte_carlo'</span></span><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'mcsqs'</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1897-L2165"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SQSTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>A transformation that creates a special quasi-random structure (SQS)
from a structure with partial occupancies.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>scaling</strong> (<em>int</em><em> or </em><em>list</em>) – <p>Scaling factor to determine supercell. Two options are possible:
a. (preferred) Scales number of atoms, e.g. for a structure with 8 atoms,</p>
<blockquote>
<div><p>scaling=4 would lead to a 32 atom supercell</p>
</div></blockquote>
<ol class="loweralpha simple" start="2">
<li><dl class="simple">
<dt>A sequence of three scaling factors, e.g. [2, 1, 1], which</dt><dd><p>specifies that the supercell should have dimensions 2a x b x c</p>
</dd>
</dl>
</li>
</ol>
</p></li>
<li><p><strong>cluster_size_and_shell</strong> (<em>Optional</em><em>[</em><em>Dict</em><em>[</em><em>int</em><em>, </em><em>int</em><em>]</em><em>]</em>) – Dictionary of cluster interactions with entries in
the form number of atoms: nearest neighbor shell</p></li>
<li><p><strong>search_time</strong> (<em>float</em><em>, </em><em>optional</em>) – If sqs_method == “mcsqs”, the time spent looking for the ideal SQS
in minutes (default: 60)</p></li>
<li><p><strong>directory</strong> (<em>str</em><em>, </em><em>optional</em>) – Directory to run mcsqs calculation and store files (default: None
runs calculations in a temp directory)</p></li>
<li><p><strong>instances</strong> (<em>int</em><em>, </em><em>optional</em>) – Specifies the number of parallel instances of mcsqs to run
(default: number of cpu cores detected by Python)</p></li>
<li><p><strong>temperature</strong> (<em>float</em><em>, </em><em>optional</em>) – Monte Carlo temperature (default: 1), “T” in atat code</p></li>
<li><p><strong>wr</strong> (<em>float</em><em>, </em><em>optional</em>) – Weight assigned to range of perfect correlation match in objective
function (default = 1)</p></li>
<li><p><strong>wn</strong> (<em>float</em><em>, </em><em>optional</em>) – Multiplicative decrease in weight per additional point in cluster (default: 1)</p></li>
<li><p><strong>wd</strong> (<em>float</em><em>, </em><em>optional</em>) – Exponent of decay in weight as function of cluster diameter (default: 0)</p></li>
<li><p><strong>tol</strong> (<em>float</em><em>, </em><em>optional</em>) – Tolerance for matching correlations (default: 1e-3)</p></li>
<li><p><strong>icet_sqs_kwargs</strong> (<em>dict</em>) – If icet is used for the SQS search, kwargs to pass to
pymatgen.io.icet.IcetSQS</p></li>
<li><p><strong>best_only</strong> (<em>bool</em><em>, </em><em>optional</em>) – only return structures with lowest objective function</p></li>
<li><p><strong>remove_duplicate_structures</strong> (<em>bool</em><em>, </em><em>optional</em>) – only return unique structures</p></li>
<li><p><strong>reduction_algo</strong> (<em>str</em><em>, </em><em>optional</em>) – The lattice reduction algorithm to use.
One of “niggli” or “LLL”. Passing False does not reduce structure.</p></li>
<li><p><strong>sqs_method</strong> (<em>str</em>) – One of “mcsqs” (MCSQS method from ATAT), “icet-enumeration”
(enumeration of all possible SQS structures of a given size with icet),
or “icet-monte_carlo” (Monte Carlo search with icet, similar to MCSQS).</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SQSTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L2030-L2097"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SQSTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply SQS transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> (<em>pymatgen Structure</em>) – pymatgen Structure with partial occupancies</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – <p>If return_ranked_list is int, that number of structures</p>
<p>is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>pymatgen Structure which is an SQS of the input structure</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SQSTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="k"><span class="pre">True</span></span><span class="p"><span class="pre">]</span></span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/advanced_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SQSTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SlabTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SlabTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">miller_index</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_slab_size</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_vacuum_size</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lll_reduce</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">center_slab</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">in_unit_planes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">primitive</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_normal_search</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shift</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tol</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.1</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1138-L1207"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SlabTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>A transformation that creates a slab from a structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>miller_index</strong> (<em>3-tuple</em><em> or </em><em>list</em>) – miller index of slab</p></li>
<li><p><strong>min_slab_size</strong> (<em>float</em>) – minimum slab size in angstroms</p></li>
<li><p><strong>min_vacuum_size</strong> (<em>float</em>) – minimum size of vacuum</p></li>
<li><p><strong>lll_reduce</strong> (<em>bool</em>) – whether to apply LLL reduction</p></li>
<li><p><strong>center_slab</strong> (<em>bool</em>) – whether to center the slab</p></li>
<li><p><strong>primitive</strong> (<em>bool</em>) – whether to reduce slabs to most primitive cell</p></li>
<li><p><strong>in_unit_planes</strong> (<em>bool</em>) – Whether to set min_slab_size and min_vac_size
in units of hkl planes (True) or Angstrom (False, the default). Setting in
units of planes is useful for ensuring some slabs have a certain n_layer of
atoms. e.g. for Cs (100), a 10 Ang slab will result in a slab with only 2
layer of atoms, whereas Fe (100) will have more layer of atoms. By using units
of hkl planes instead, we ensure both slabs have the same number of atoms. The
slab thickness will be in min_slab_size/math.ceil(self._proj_height/dhkl)
multiples of oriented unit cells.</p></li>
<li><p><strong>max_normal_search</strong> (<em>int</em>) – maximum index to include in linear
combinations of indices to find c lattice vector orthogonal
to slab surface</p></li>
<li><p><strong>shift</strong> (<em>float</em>) – shift to get termination</p></li>
<li><p><strong>tol</strong> (<em>float</em>) – tolerance for primitive cell finding.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SlabTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1187-L1207"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SlabTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Slab Structures.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SubstituteSurfaceSiteTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SubstituteSurfaceSiteTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">atom</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">selective_dynamics</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.9</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mi_vec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_species</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sub_both_sides</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">range_tol</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.01</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dist_from_surf</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1799-L1878"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SubstituteSurfaceSiteTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Use AdsorptionSiteFinder to perform substitution-type doping on the surface
and returns all possible configurations where one dopant is substituted
per surface. Can substitute one surface or both.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>atom</strong> (<em>str</em>) – atom corresponding to substitutional dopant</p></li>
<li><p><strong>selective_dynamics</strong> (<em>bool</em>) – flag for whether to assign
non-surface sites as fixed for selective dynamics</p></li>
<li><p><strong>height</strong> (<em>float</em>) – height criteria for selection of surface sites</p></li>
<li><p><strong>mi_vec</strong> – vector corresponding to the vector
concurrent with the miller index, this enables use with
slabs that have been reoriented, but the miller vector
must be supplied manually</p></li>
<li><p><strong>target_species</strong> – List of specific species to substitute</p></li>
<li><p><strong>sub_both_sides</strong> (<em>bool</em>) – If true, substitute an equivalent
site on the other surface</p></li>
<li><p><strong>range_tol</strong> (<em>float</em>) – Find viable substitution sites at a specific
distance from the surface +- this tolerance</p></li>
<li><p><strong>dist_from_surf</strong> (<em>float</em>) – Distance from the surface to find viable
substitution sites, defaults to 0 to substitute at the surface.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SubstituteSurfaceSiteTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">dict</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L1843-L1873"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SubstituteSurfaceSiteTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – Must be a Slab structure</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – <p>If return_ranked_list is int, that number of structures.</p>
<p>is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>each dict has key ‘structure’ which is a Slab with sites substituted</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>list[dict]</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SubstituteSurfaceSiteTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="k"><span class="pre">True</span></span><span class="p"><span class="pre">]</span></span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/advanced_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SubstituteSurfaceSiteTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SubstitutionPredictorTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SubstitutionPredictorTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">threshold</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.01</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scale_volumes</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L481-L538"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SubstitutionPredictorTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This transformation takes a structure and uses the structure
prediction module to find likely site substitutions.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>threshold</strong> – Threshold for substitution.</p></li>
<li><p><strong>scale_volumes</strong> – Whether to scale volumes after substitution.</p></li>
<li><p><strong>**kwargs</strong> – Args for SubstitutionProbability class lambda_table, alpha.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SubstitutionPredictorTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L501-L533"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SubstitutionPredictorTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – Input Structure</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – <p>If return_ranked_list is int, that number of structures</p>
<p>is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Predicted Structures.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SubstitutionPredictorTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="k"><span class="pre">True</span></span><span class="p"><span class="pre">]</span></span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/advanced_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SubstitutionPredictorTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SuperTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SuperTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">transformations</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nstructures_per_trans</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L95-L150"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SuperTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This is a transformation that is inherently one-to-many. It is constructed
from a list of transformations and returns one structure for each
transformation. The primary use for this class is extending a transmuter
object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>transformations</strong> (<em>[</em><em>transformations</em><em>]</em>) – List of transformations to apply
to a structure. One transformation is applied to each output
structure.</p></li>
<li><p><strong>nstructures_per_trans</strong> (<em>int</em>) – If the transformations are one-to-many and,
nstructures_per_trans structures from each transformation are
added to the full list. Defaults to 1, i.e., only best structure.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SuperTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L118-L145"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SuperTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – Input Structure</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – <p>If return_ranked_list is int, that number of structures</p>
<p>is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Structures with all transformations applied.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.SuperTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Literal</span><span class="p"><span class="pre">[</span></span><span class="k"><span class="pre">True</span></span><span class="p"><span class="pre">]</span></span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/advanced_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.SuperTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.transformations.advanced_transformations.find_codopant">
<span class="sig-name descname"><span class="pre">find_codopant</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">target</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.periodic_table.Species" title="pymatgen.core.periodic_table.Species"><span class="pre">Species</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">oxidation_state</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allowed_elements</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Sequence</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.periodic_table.Species" title="pymatgen.core.periodic_table.Species"><span class="pre">Species</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/advanced_transformations.py#L904-L936"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.advanced_transformations.find_codopant" title="Link to this definition"></a></dt>
<dd><p>Find the element from “allowed elements” that (i) possesses the desired
“oxidation state” and (ii) is closest in ionic radius to the target specie.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>target</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.periodic_table.Species" title="pymatgen.core.periodic_table.Species"><em>Species</em></a>) – provides target ionic radius.</p></li>
<li><p><strong>oxidation_state</strong> (<em>float</em>) – co-dopant oxidation state.</p></li>
<li><p><strong>allowed_elements</strong> (<em>list</em><em>[</em><em>str</em><em>]</em>) – List of allowed elements. If None,
all elements are tried.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>with oxidation_state that has ionic radius closest to target.</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="pymatgen.core.html#pymatgen.core.periodic_table.Species" title="pymatgen.core.periodic_table.Species">Species</a></p>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-pymatgen.transformations.site_transformations">
<span id="pymatgen-transformations-site-transformations-module"></span><h2>pymatgen.transformations.site_transformations module<a class="headerlink" href="#module-pymatgen.transformations.site_transformations" title="Link to this heading"></a></h2>
<p>This module defines site transformations which transforms a structure into
another structure. Site transformations differ from standard transformations
in that they operate in a site-specific manner.
All transformations should inherit the AbstractTransformation ABC.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.AddSitePropertyTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">AddSitePropertyTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">site_properties</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L469-L492"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.AddSitePropertyTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Simple transformation to add site properties to a given structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>site_properties</strong> (<em>dict</em>) – site properties to be added to a structure.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.AddSitePropertyTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L479-L492"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.AddSitePropertyTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – A structurally similar structure in
regards to crystal and site positions.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>A copy of structure with sites properties added.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.InsertSitesTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">InsertSitesTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">species</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coords</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">coords_are_cartesian</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">validate_proximity</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L28-L71"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.InsertSitesTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This transformation substitutes certain sites with certain species.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>species</strong> – A list of species. e.g. [“Li”, “Fe”]</p></li>
<li><p><strong>coords</strong> – A list of coords corresponding to those species. e.g.
[[0,0,0],[0.5,0.5,0.5]].</p></li>
<li><p><strong>coords_are_cartesian</strong> (<em>bool</em>) – Set to True if coords are given in
Cartesian coords. Defaults to False.</p></li>
<li><p><strong>validate_proximity</strong> (<em>bool</em>) – Set to False if you do not wish to ensure
that added sites are not too close to other sites. Defaults to True.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.InsertSitesTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L49-L68"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.InsertSitesTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – A structurally similar structure in
regards to crystal and site positions.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>A copy of structure with sites inserted.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">PartialRemoveSitesTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">indices</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fractions</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">algo</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L198-L466"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Remove fraction of specie from a structure.
Requires an oxidation state decorated structure for Ewald sum to be
computed.</p>
<p>Given that the solution to selecting the right removals is NP-hard, there
are several algorithms provided with varying degrees of accuracy and speed.
The options are as follows:</p>
<dl class="simple">
<dt>ALGO_FAST:</dt><dd><p>This is a highly optimized algorithm to quickly go through the search
tree. It is guaranteed to find the optimal solution, but will return
only a single lowest energy structure. Typically, you will want to use
this.</p>
</dd>
<dt>ALGO_COMPLETE:</dt><dd><p>The complete algo ensures that you get all symmetrically distinct
orderings, ranked by the estimated Ewald energy. But this can be an
extremely time-consuming process if the number of possible orderings is
very large. Use this if you really want all possible orderings. If you
want just the lowest energy ordering, ALGO_FAST is accurate and faster.</p>
</dd>
<dt>ALGO_BEST_FIRST:</dt><dd><p>This algorithm is for ordering the really large cells that defeats even
ALGO_FAST. For example, if you have 48 sites of which you want to
remove 16 of them, the number of possible orderings is around
2 x 10^12. ALGO_BEST_FIRST shortcircuits the entire search tree by
removing the highest energy site first, then followed by the next
highest energy site, and so on. It is guaranteed to find a solution
in a reasonable time, but it is also likely to be highly inaccurate.</p>
</dd>
<dt>ALGO_ENUMERATE:</dt><dd><p>This algorithm uses the EnumerateStructureTransformation to perform
ordering. This algo returns <em>complete</em> orderings up to a single unit
cell size. It is more robust than the ALGO_COMPLETE, but requires
Gus Hart’s enumlib to be installed.</p>
</dd>
</dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>indices</strong> – A list of list of indices, e.g. [[0, 1], [2, 3, 4, 5]].</p></li>
<li><p><strong>fractions</strong> – The corresponding fractions to remove. Must be same length as
indices. e.g. [0.5, 0.25]</p></li>
<li><p><strong>algo</strong> – This parameter allows you to choose the algorithm to perform
ordering. Use one of PartialRemoveSpecieTransformation.ALGO_*
variables to set the algo.</p></li>
</ul>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.ALGO_BEST_FIRST">
<span class="sig-name descname"><span class="pre">ALGO_BEST_FIRST</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">2</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/site_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.ALGO_BEST_FIRST" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.ALGO_COMPLETE">
<span class="sig-name descname"><span class="pre">ALGO_COMPLETE</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">1</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/site_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.ALGO_COMPLETE" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.ALGO_ENUMERATE">
<span class="sig-name descname"><span class="pre">ALGO_ENUMERATE</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">3</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/site_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.ALGO_ENUMERATE" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.ALGO_FAST">
<span class="sig-name descname"><span class="pre">ALGO_FAST</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">0</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/site_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.ALGO_FAST" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L406-L458"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – input structure</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em>) – Whether or not multiple structures are returned.
If return_ranked_list is int, that number of structures is returned.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Depending on returned_ranked list, either a transformed structure
or a list of dictionaries, where each dictionary is of the form
{“structure” = …. , “other_arguments”}
the key “transformation” is reserved for the transformation that
was actually applied to the structure.
This transformation is parsed by the alchemy classes for generating
a more specific transformation history. Any other information will
be stored in the transformation_parameters dictionary in the
transmuted structure class.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/site_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.RadialSiteDistortionTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">RadialSiteDistortionTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">site_index</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">displacement</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nn_only</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L495-L573"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.RadialSiteDistortionTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Radially perturbs atoms around a site. Can be used to create spherical distortion due to a
point defect.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>site_index</strong> (<em>int</em>) – index of the site in structure to place at the center of the distortion (will
not be distorted). This index must be provided before the structure is provided in
apply_transformation in order to keep in line with the base class.</p></li>
<li><p><strong>displacement</strong> (<em>float</em>) – distance to perturb the atoms around the objective site</p></li>
<li><p><strong>nn_only</strong> (<em>bool</em>) – Whether to perturb beyond the nearest neighbors. If True, then only the
nearest neighbors will be perturbed, leaving the other sites undisturbed. If False, then
the nearest neighbors will receive the full displacement, and then subsequent sites will receive
a displacement=0.1 / r, where r is the distance each site to the origin site. For small displacements,
atoms beyond the NN environment will receive very small displacements, and these are almost equal.
For large displacements, this difference is noticeable.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.RadialSiteDistortionTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L518-L555"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.RadialSiteDistortionTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> – Structure or Molecule to apply the transformation to</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>the transformed structure</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.RadialSiteDistortionTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/site_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.RadialSiteDistortionTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Determine if a Transformation is a one-to-many transformation. If a
Transformation is a one-to-many transformation, the
apply_transformation method should have a keyword arg
“return_ranked_list” which allows for the transformed structures to be
returned as a ranked list.</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.RadialSiteDistortionTransformation.use_multiprocessing">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">use_multiprocessing</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/site_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.RadialSiteDistortionTransformation.use_multiprocessing" title="Link to this definition"></a></dt>
<dd><p>Indicates whether the transformation can be applied by a
subprocessing pool. This should be overridden to return True for
transformations that the transmuter can parallelize.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.RemoveSitesTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">RemoveSitesTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">indices_to_remove</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L110-L135"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.RemoveSitesTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Remove certain sites in a structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>indices_to_remove</strong> – List of indices to remove. e.g. [0, 1, 2].</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.RemoveSitesTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L120-L132"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.RemoveSitesTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – A structurally similar structure in
regards to crystal and site positions.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>A copy of structure with sites removed.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.ReplaceSiteSpeciesTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">ReplaceSiteSpeciesTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">indices_species_map</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L74-L107"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.ReplaceSiteSpeciesTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This transformation substitutes certain sites with certain species.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>indices_species_map</strong> – A dict containing the species mapping in
int-string pairs. e.g. { 1:”Na”} or {2:”Mn2+”}. Multiple
substitutions can be done. Overloaded to accept sp_and_occu
dictionary. E.g. {1: {“Ge”:0.75, “C”:0.25} }, which
substitutes a single species with multiple species to generate a
disordered structure.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.ReplaceSiteSpeciesTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L89-L102"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.ReplaceSiteSpeciesTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – A structurally similar structure in
regards to crystal and site positions.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>A copy of structure with sites replaced.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.TranslateSitesTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TranslateSitesTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">indices_to_move</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">translation_vector</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vector_in_frac_coords</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L138-L195"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.TranslateSitesTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This class translates a set of sites by a certain vector.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>indices_to_move</strong> – The indices of the sites to move</p></li>
<li><p><strong>translation_vector</strong> – Vector to move the sites. If a list of list or numpy
array of shape, (len(indices_to_move), 3), is provided then each
translation vector is applied to the corresponding site in the
indices_to_move.</p></li>
<li><p><strong>vector_in_frac_coords</strong> – Set to True if the translation vector is in
fractional coordinates, and False if it is in cartesian
coordinations. Defaults to True.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.TranslateSitesTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L157-L177"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.TranslateSitesTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – A structurally similar structure in
regards to crystal and site positions.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>A copy of structure with sites translated.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.TranslateSitesTransformation.as_dict">
<span class="sig-name descname"><span class="pre">as_dict</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/site_transformations.py#L191-L195"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.TranslateSitesTransformation.as_dict" title="Link to this definition"></a></dt>
<dd><p>JSON-serializable dict representation.</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.site_transformations.TranslateSitesTransformation.inverse">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">inverse</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="#pymatgen.transformations.site_transformations.TranslateSitesTransformation" title="pymatgen.transformations.site_transformations.TranslateSitesTransformation"><span class="pre">TranslateSitesTransformation</span></a></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/site_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.site_transformations.TranslateSitesTransformation.inverse" title="Link to this definition"></a></dt>
<dd><p>TranslateSitesTransformation with the reverse translation.</p>
</dd></dl>

</dd></dl>

</section>
<section id="module-pymatgen.transformations.standard_transformations">
<span id="pymatgen-transformations-standard-transformations-module"></span><h2>pymatgen.transformations.standard_transformations module<a class="headerlink" href="#module-pymatgen.transformations.standard_transformations" title="Link to this heading"></a></h2>
<p>This module defines standard transformations which transforms a structure into
another structure. Standard transformations operate in a structure-wide manner,
rather than site-specific manner.
All transformations should inherit the AbstractTransformation ABC.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.AutoOxiStateDecorationTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">AutoOxiStateDecorationTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">symm_tol</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_radius</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">4</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_permutations</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">100000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">distance_scale_factor</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1.015</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">zeros_on_fail</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L100-L153"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.AutoOxiStateDecorationTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This transformation automatically decorates a structure with oxidation
states using a bond valence approach.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>symm_tol</strong> (<em>float</em>) – Symmetry tolerance used to determine which sites are
symmetrically equivalent. Set to 0 to turn off symmetry.</p></li>
<li><p><strong>max_radius</strong> (<em>float</em>) – Maximum radius in Angstrom used to find nearest
neighbors.</p></li>
<li><p><strong>max_permutations</strong> (<em>int</em>) – Maximum number of permutations of oxidation
states to test.</p></li>
<li><p><strong>distance_scale_factor</strong> (<em>float</em>) – A scale factor to be applied. This is
useful for scaling distances, esp in the case of
calculation-relaxed structures, which may tend to under (GGA) or
over bind (LDA). The default of 1.015 works for GGA. For
experimental structure, set this to 1.</p></li>
<li><p><strong>zeros_on_fail</strong> (<em>bool</em>) – If True and the BVAnalyzer fails to come up
with a guess for the oxidation states, we will set the all the
oxidation states to zero.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.AutoOxiStateDecorationTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L137-L153"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.AutoOxiStateDecorationTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Oxidation state decorated Structure.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.ChargedCellTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">ChargedCellTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">charge</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L846-L878"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.ChargedCellTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>The ChargedCellTransformation applies a charge to a structure (or defect
object).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>charge</strong> – A integer charge to apply to the structure.
Defaults to zero. Has to be a single integer. e.g. 2.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.ChargedCellTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L859-L870"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.ChargedCellTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Charged Structure.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.ChargedCellTransformation.inverse">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">inverse</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.ChargedCellTransformation.inverse" title="Link to this definition"></a></dt>
<dd><p>NotImplementedError.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>Raises</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.ConventionalCellTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">ConventionalCellTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">symprec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.01</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle_tolerance</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">international_monoclinic</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L690-L718"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.ConventionalCellTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This class finds the conventional cell of the input structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>symprec</strong> (<em>float</em>) – tolerance as in SpacegroupAnalyzer</p></li>
<li><p><strong>angle_tolerance</strong> (<em>float</em>) – angle tolerance as in SpacegroupAnalyzer</p></li>
<li><p><strong>international_monoclinic</strong> (<em>bool</em>) – whether to use beta (True) or alpha (False)</p></li>
</ul>
</dd>
</dl>
<p>as the non-right-angle in the unit cell.</p>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.ConventionalCellTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L705-L715"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.ConventionalCellTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Get most primitive cell for structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> – A structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The same structure in a conventional standard setting</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.DeformStructureTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">DeformStructureTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">deformation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">((1,</span> <span class="pre">0,</span> <span class="pre">0),</span> <span class="pre">(0,</span> <span class="pre">1,</span> <span class="pre">0),</span> <span class="pre">(0,</span> <span class="pre">0,</span> <span class="pre">1))</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L759-L787"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.DeformStructureTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This transformation deforms a structure by a deformation gradient matrix.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>deformation</strong> (<em>array</em>) – deformation gradient for the transformation.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.DeformStructureTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L770-L779"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.DeformStructureTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Deformed Structure.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.DeformStructureTransformation.inverse">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">inverse</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.DeformStructureTransformation.inverse" title="Link to this definition"></a></dt>
<dd><p>Inverse Transformation.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.DiscretizeOccupanciesTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">DiscretizeOccupanciesTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">max_denominator</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tol</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fix_denominator</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L790-L843"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.DiscretizeOccupanciesTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Discretize the site occupancies in a disordered structure; useful for
grouping similar structures or as a pre-processing step for order-disorder
transformations.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>max_denominator</strong> – An integer maximum denominator for discretization. A higher
denominator allows for finer resolution in the site occupancies.</p></li>
<li><p><strong>tol</strong> – A float that sets the maximum difference between the original and
discretized occupancies before throwing an error. If None, it is
set to 1 / (4 * max_denominator).</p></li>
<li><p><strong>fix_denominator</strong> (<em>bool</em>) – If True, will enforce a common denominator for all species.
This prevents a mix of denominators (for example, 1/3, 1/4)
that might require large cell sizes to perform an enumeration.
‘tol’ needs to be &gt; 1.0 in some cases.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.DiscretizeOccupanciesTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L816-L840"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.DiscretizeOccupanciesTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Discretize the site occupancies in the structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> – disordered Structure to discretize occupancies</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>new disordered Structure instance with occupancies discretized</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure">Structure</a></p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">OrderDisorderedStructureTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">algo</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">symmetrized_structures</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">no_oxi_states</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">occ_tol</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.25</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">symprec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle_tolerance</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L425-L655"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Order a disordered structure. The disordered structure must be oxidation
state decorated for Ewald sum to be computed. No attempt is made to perform
symmetry determination to reduce the number of combinations.</p>
<p>Hence, attempting to order a large number of disordered sites can be extremely
expensive. The time scales approximately with the
number of possible combinations. The algorithm can currently compute
approximately 5,000,000 permutations per minute.</p>
<p>Also, simple rounding of the occupancies are performed, with no attempt
made to achieve a target composition. This is usually not a problem for
most ordering problems, but there can be times where rounding errors may
result in structures that do not have the desired composition.
This second step will be implemented in the next iteration of the code.</p>
<p>If multiple fractions for a single species are found for different sites,
these will be treated separately if the difference is above a threshold
tolerance. currently this is .1</p>
<p>For example, if a fraction of .25 Li is on sites 0, 1, 2, 3 and .5 on sites
4, 5, 6, 7 then 1 site from [0, 1, 2, 3] will be filled and 2 sites from [4, 5, 6, 7]
will be filled, even though a lower energy combination might be found by
putting all lithium in sites [4, 5, 6, 7].</p>
<p>USE WITH CARE.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>algo</strong> (<em>int</em>) – Algorithm to use.</p></li>
<li><p><strong>symmetrized_structures</strong> (<em>bool</em>) – Whether the input structures are
instances of SymmetrizedStructure, and that their symmetry
should be used for the grouping of sites.</p></li>
<li><p><strong>no_oxi_states</strong> (<em>bool</em>) – Whether to remove oxidation states prior to
ordering.</p></li>
<li><p><strong>occ_tol</strong> (<em>float</em>) – Occupancy tolerance. If the total occupancy of a group is within this value
of an integer, it will be rounded to that integer otherwise raise a ValueError.
Defaults to 0.25.</p></li>
<li><p><strong>symprec</strong> – float or None (default)
If a float, and symmetrized_structures is True, the linear tolerance
used to symmetrize structures with SpacegroupAnalyzer.</p></li>
<li><p><strong>angle_tolerance</strong> – float or None (default)
If a float, and symmetrized_structures is True, the angle tolerance
used to symmetrize structures with SpacegroupAnalyzer.</p></li>
</ul>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.ALGO_BEST_FIRST">
<span class="sig-name descname"><span class="pre">ALGO_BEST_FIRST</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">2</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.ALGO_BEST_FIRST" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.ALGO_COMPLETE">
<span class="sig-name descname"><span class="pre">ALGO_COMPLETE</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">1</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.ALGO_COMPLETE" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.ALGO_FAST">
<span class="sig-name descname"><span class="pre">ALGO_FAST</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">0</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.ALGO_FAST" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.ALGO_RANDOM">
<span class="sig-name descname"><span class="pre">ALGO_RANDOM</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">-1</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.ALGO_RANDOM" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference internal" href="pymatgen.symmetry.html#pymatgen.symmetry.structure.SymmetrizedStructure" title="pymatgen.symmetry.structure.SymmetrizedStructure"><span class="pre">SymmetrizedStructure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">list</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L493-L642"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>For this transformation, the apply_transformation method will return
only the ordered structure with the lowest Ewald energy, to be
consistent with the method signature of the other transformations.
However, all structures are stored in the all_structures attribute in
the transformation object for easy access.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – Oxidation state decorated disordered structure to order</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – If return_ranked_list is int, that number of structures
is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Depending on returned_ranked list, either a transformed structure
or a list of dictionaries, where each dictionary is of the form
{“structure” = …. , “other_arguments”}
the key “transformation” is reserved for the transformation that
was actually applied to the structure.
This transformation is parsed by the alchemy classes for generating
a more specific transformation history. Any other information will
be stored in the transformation_parameters dictionary in the
transmuted structure class.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.lowest_energy_structure">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">lowest_energy_structure</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.OrderDisorderedStructureTransformation.lowest_energy_structure" title="Link to this definition"></a></dt>
<dd><p>Lowest energy structure found.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.OxidationStateDecorationTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">OxidationStateDecorationTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">oxidation_states</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L75-L97"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.OxidationStateDecorationTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This transformation decorates a structure with oxidation states.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>oxidation_states</strong> (<em>dict</em>) – Oxidation states supplied as a dict,</p></li>
<li><p><strong>{&quot;Li&quot;</strong> (<em>e.g.</em>) – 1, “O”:-2}.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.OxidationStateDecorationTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L86-L97"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.OxidationStateDecorationTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Oxidation state decorated Structure.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.OxidationStateRemovalTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">OxidationStateRemovalTransformation</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L156-L171"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.OxidationStateRemovalTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This transformation removes oxidation states from a structure.</p>
<p>No arg needed.</p>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.OxidationStateRemovalTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L162-L171"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.OxidationStateRemovalTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Non-oxidation state decorated Structure.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">PartialRemoveSpecieTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">specie_to_remove</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fraction_to_remove</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">algo</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L357-L422"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Remove fraction of specie from a structure.</p>
<p>Requires an oxidation state decorated structure for Ewald sum to be
computed.</p>
<p>Given that the solution to selecting the right removals is NP-hard, there
are several algorithms provided with varying degrees of accuracy and speed.
Please see
pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>specie_to_remove</strong> – Species to remove. Must have oxidation state e.g.
“Li+”</p></li>
<li><p><strong>fraction_to_remove</strong> – Fraction of specie to remove. e.g. 0.5</p></li>
<li><p><strong>algo</strong> – This parameter allows you to choose the algorithm to perform
ordering. Use one of PartialRemoveSpecieTransformation.ALGO_*
variables to set the algo.</p></li>
</ul>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.ALGO_BEST_FIRST">
<span class="sig-name descname"><span class="pre">ALGO_BEST_FIRST</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">2</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.ALGO_BEST_FIRST" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.ALGO_COMPLETE">
<span class="sig-name descname"><span class="pre">ALGO_COMPLETE</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">1</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.ALGO_COMPLETE" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.ALGO_ENUMERATE">
<span class="sig-name descname"><span class="pre">ALGO_ENUMERATE</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">3</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.ALGO_ENUMERATE" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.ALGO_FAST">
<span class="sig-name descname"><span class="pre">ALGO_FAST</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">0</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.ALGO_FAST" title="Link to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_ranked_list</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L388-L411"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – input structure</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – <p>If return_ranked_list is int, that number of structures</p>
<p>is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Depending on returned_ranked list, either a transformed structure
or a list of dictionaries, where each dictionary is of the form
{“structure” = …. , “other_arguments”}
the key “transformation” is reserved for the transformation that
was actually applied to the structure.
This transformation is parsed by the alchemy classes for generating
a more specific transformation history. Any other information will
be stored in the transformation_parameters dictionary in the
transmuted structure class.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.PartialRemoveSpecieTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Transform one structure to many.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.PerturbStructureTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">PerturbStructureTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">distance</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.01</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_distance</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L721-L756"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.PerturbStructureTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This transformation perturbs a structure by a specified distance in random
directions. Used for breaking symmetries.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>distance</strong> – Distance of perturbation in angstroms. All sites
will be perturbed by exactly that distance in a random
direction.</p></li>
<li><p><strong>min_distance</strong> – Minimum distance for the perturbation range. Defaults to None, which means all</p></li>
<li><p><strong>magnitude.</strong> (<em>perturbations are the same</em>)</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.PerturbStructureTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L742-L753"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.PerturbStructureTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Structure with sites perturbed.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.PrimitiveCellTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">PrimitiveCellTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tolerance</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.5</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L658-L687"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.PrimitiveCellTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This class finds the primitive cell of the input structure.
It returns a structure that is not necessarily orthogonalized
Author: Will Richards.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>tolerance</strong> (<em>float</em>) – Tolerance for each coordinate of a particular
site. For example, [0.5, 0, 0.5] in Cartesian coordinates will be
considered to be on the same coordinates as [0, 0, 0] for a
tolerance of 0.5. Defaults to 0.5.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.PrimitiveCellTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L674-L684"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.PrimitiveCellTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Get most primitive cell for structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> – A structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The most primitive structure found. The returned structure is
guaranteed to have len(new structure) &lt;= len(structure).</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.RemoveSpeciesTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">RemoveSpeciesTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">species_to_remove</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L329-L354"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.RemoveSpeciesTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Remove all occurrences of some species from a structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>species_to_remove</strong> – List of species to remove. e.g. [“Li”, “Mn”].</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.RemoveSpeciesTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L339-L351"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.RemoveSpeciesTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Structure with species removed.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.RotationTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">RotationTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">axis</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle_in_radians</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L34-L72"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.RotationTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>The RotationTransformation applies a rotation to a structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>axis</strong> (<em>3x1 array</em>) – Axis of rotation, e.g. [1, 0, 0]</p></li>
<li><p><strong>angle</strong> (<em>float</em>) – Angle to rotate</p></li>
<li><p><strong>angle_in_radians</strong> (<em>bool</em>) – Set to True if angle is supplied in radians.
Else degrees are assumed.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.RotationTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L50-L61"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.RotationTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Rotated Structure.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.RotationTransformation.inverse">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">inverse</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.RotationTransformation.inverse" title="Link to this definition"></a></dt>
<dd><p>Inverse Transformation.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.ScaleToRelaxedTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">ScaleToRelaxedTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">unrelaxed_structure</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">relaxed_structure</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">species_map</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L881-L943"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.ScaleToRelaxedTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>Takes the unrelaxed and relaxed structure and applies its site and volume
relaxation to a structurally similar structures (e.g. bulk: NaCl and PbTe
(rock-salt), slab: Sc(10-10) and Mg(10-10) (hcp), GB: Mo(001) sigma 5 GB,
Fe(001) sigma 5). Useful for finding an initial guess of a set of similar
structures closer to its most relaxed state.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>unrelaxed_structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Initial, unrelaxed structure</p></li>
<li><p><strong>relaxed_structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Relaxed structure</p></li>
<li><p><strong>species_map</strong> (<em>dict</em>) – A dict or list of tuples containing the species mapping in
string-string pairs. The first species corresponds to the relaxed
structure while the second corresponds to the species in the
structure to be scaled. e.g. {“Li”:”Na”} or [(“Fe2+”,”Mn2+”)].
Multiple substitutions can be done. Overloaded to accept
sp_and_occu dictionary E.g. {“Si: {“Ge”:0.75, “C”:0.25}},
which substitutes a single species with multiple species to
generate a disordered structure.</p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.ScaleToRelaxedTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L916-L940"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.ScaleToRelaxedTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Get a copy of structure with lattice parameters
and sites scaled to the same degree as the relaxed_structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – A structurally similar structure in
regards to crystal and site positions.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.SubstitutionTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SubstitutionTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">species_map</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">SpeciesLike</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">SpeciesLike</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">SpeciesLike</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">SpeciesLike</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">SpeciesLike</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L278-L326"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.SubstitutionTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>This transformation substitutes species for one another.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>species_map</strong> – A dict or list of tuples containing the species mapping in
string-string pairs. e.g. {“Li”: “Na”} or [(“Fe2+”,”Mn2+”)].
Multiple substitutions can be done. Overloaded to accept
sp_and_occu dictionary E.g. {“Si: {“Ge”:0.75, “C”:0.25}},
which substitutes a single species with multiple species to
generate a disordered structure.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.SubstitutionTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L302-L317"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.SubstitutionTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Substituted Structure.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.SubstitutionTransformation.inverse">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">inverse</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.SubstitutionTransformation.inverse" title="Link to this definition"></a></dt>
<dd><p>Inverse Transformation.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.SupercellTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">SupercellTransformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">scaling_matrix</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">((1,</span> <span class="pre">0,</span> <span class="pre">0),</span> <span class="pre">(0,</span> <span class="pre">1,</span> <span class="pre">0),</span> <span class="pre">(0,</span> <span class="pre">0,</span> <span class="pre">1))</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L174-L275"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.SupercellTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><code class="xref py py-class docutils literal notranslate"><span class="pre">AbstractTransformation</span></code></a></p>
<p>The SupercellTransformation replicates a unit cell to a supercell.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>scaling_matrix</strong> – A matrix of transforming the lattice vectors.
Defaults to the identity matrix. Has to be all integers. e.g.
[[2,1,0],[0,3,0],[0,0,1]] generates a new structure with
lattice vectors a” = 2a + b, b” = 3b, c” = c where a, b, and c
are the lattice vectors of the original structure.</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.SupercellTransformation.apply_transformation">
<span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L258-L267"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.SupercellTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input Structure</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Supercell Structure.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.SupercellTransformation.from_boundary_distance">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_boundary_distance</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_boundary_dist</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">6</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">allow_rotation</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">bool</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_atoms</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">-1</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L205-L256"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.SupercellTransformation.from_boundary_distance" title="Link to this definition"></a></dt>
<dd><p>Get a SupercellTransformation according to the desired minimum distance between periodic
boundaries of the resulting supercell.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> (<a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><em>Structure</em></a>) – Input structure.</p></li>
<li><p><strong>min_boundary_dist</strong> (<em>float</em>) – Desired minimum distance between all periodic boundaries. Defaults to 6.</p></li>
<li><p><strong>allow_rotation</strong> (<em>bool</em>) – Whether allowing lattice angles to change. Only useful when
at least two of the three lattice vectors are required to expand. Defaults to False.
If True, a SupercellTransformation satisfying min_boundary_dist but with smaller
number of atoms than the SupercellTransformation with unchanged lattice angles
can possibly be found. If such a SupercellTransformation cannot be found easily,
the SupercellTransformation with unchanged lattice angles will be returned.</p></li>
<li><p><strong>max_atoms</strong> (<em>int</em>) – Maximum number of atoms allowed in the supercell. Defaults to -1 for infinity.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>SupercellTransformation.</p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.SupercellTransformation.from_scaling_factors">
<em class="property"><span class="k"><span class="pre">classmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_scaling_factors</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">scale_a</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scale_b</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scale_c</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">float</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Self</span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L188-L203"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.SupercellTransformation.from_scaling_factors" title="Link to this definition"></a></dt>
<dd><p>Convenience method to get a SupercellTransformation from a simple
series of three numbers for scaling each lattice vector. Equivalent to
calling the normal with [[scale_a, 0, 0], [0, scale_b, 0],
[0, 0, scale_c]].</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>scale_a</strong> – Scaling factor for lattice direction a. Defaults to 1.</p></li>
<li><p><strong>scale_b</strong> – Scaling factor for lattice direction b. Defaults to 1.</p></li>
<li><p><strong>scale_c</strong> – Scaling factor for lattice direction c. Defaults to 1.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>SupercellTransformation.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.SupercellTransformation.inverse">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">inverse</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/standard_transformations.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.SupercellTransformation.inverse" title="Link to this definition"></a></dt>
<dd><p>NotImplementedError.</p>
<dl class="field-list simple">
<dt class="field-odd">Type<span class="colon">:</span></dt>
<dd class="field-odd"><p>Raises</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pymatgen.transformations.standard_transformations.get_randomly_manipulated_structures">
<span class="sig-name descname"><span class="pre">get_randomly_manipulated_structures</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">struct</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">manipulations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">seed</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">n_return</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">int</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">list</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/standard_transformations.py#L997-L1020"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.standard_transformations.get_randomly_manipulated_structures" title="Link to this definition"></a></dt>
<dd><p>Get a structure with random manipulations applied.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>struct</strong> – Input structure</p></li>
<li><p><strong>manipulations</strong> – List of manipulations to apply</p></li>
<li><p><strong>seed</strong> – Seed for random number generator</p></li>
<li><p><strong>n_return</strong> – Number of structures to return</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of structures with manipulations applied.</p>
</dd>
</dl>
</dd></dl>

</section>
<section id="module-pymatgen.transformations.transformation_abc">
<span id="pymatgen-transformations-transformation-abc-module"></span><h2>pymatgen.transformations.transformation_abc module<a class="headerlink" href="#module-pymatgen.transformations.transformation_abc" title="Link to this heading"></a></h2>
<p>Abstract base class for structure transformations.</p>
<dl class="py class">
<dt class="sig sig-object py" id="pymatgen.transformations.transformation_abc.AbstractTransformation">
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">AbstractTransformation</span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/transformation_abc.py#L23-L74"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">MSONable</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">ABC</span></code></p>
<p>Abstract transformation class.</p>
<dl class="py method">
<dt class="sig sig-object py" id="pymatgen.transformations.transformation_abc.AbstractTransformation.apply_transformation">
<em class="property"><span class="k"><span class="pre">abstractmethod</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">apply_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">structure</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">list</span><span class="p"><span class="pre">[</span></span><span class="pre">dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">Any</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">list</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pymatgen.core.html#pymatgen.core.structure.Structure" title="pymatgen.core.structure.Structure"><span class="pre">Structure</span></a><span class="p"><span class="pre">]</span></span></span></span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/core/../transformations/transformation_abc.py#L26-L50"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.transformation_abc.AbstractTransformation.apply_transformation" title="Link to this definition"></a></dt>
<dd><p>Apply the transformation to a structure. Depending on whether a
transformation is one-to-many, there may be an option to return a
ranked list of structures.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>structure</strong> – input structure</p></li>
<li><p><strong>return_ranked_list</strong> (<em>bool</em><em> | </em><em>int</em><em>, </em><em>optional</em>) – <p>If return_ranked_list is int, that number of structures</p>
<p>is returned. If False, only the single lowest energy structure is returned. Defaults to False.</p>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>depending on returned_ranked list, either a transformed structure
or
a list of dictionaries, where each dictionary is of the form
{‘structure’ = …. , ‘other_arguments’}
the key ‘transformation’ is reserved for the transformation that
was actually applied to the structure.
This transformation is parsed by the alchemy classes for generating
a more specific transformation history. Any other information will
be stored in the transformation_parameters dictionary in the
transmuted structure class.</p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.transformation_abc.AbstractTransformation.inverse">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">inverse</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="#pymatgen.transformations.transformation_abc.AbstractTransformation" title="pymatgen.transformations.transformation_abc.AbstractTransformation"><span class="pre">AbstractTransformation</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/transformation_abc.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.transformation_abc.AbstractTransformation.inverse" title="Link to this definition"></a></dt>
<dd><p>The inverse transformation if available.
Otherwise, should return None. Defaults to None, so only need to
override if applicable.</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.transformation_abc.AbstractTransformation.is_one_to_many">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">is_one_to_many</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/transformation_abc.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.transformation_abc.AbstractTransformation.is_one_to_many" title="Link to this definition"></a></dt>
<dd><p>Determine if a Transformation is a one-to-many transformation. In that case, the
apply_transformation method should have a keyword arg “return_ranked_list” which
allows for the transformed structures to be returned as a ranked list.
Defaults to False, so only need to override if True.</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="pymatgen.transformations.transformation_abc.AbstractTransformation.use_multiprocessing">
<em class="property"><span class="k"><span class="pre">property</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">use_multiprocessing</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">bool</span></em><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2025.6.14/src/pymatgen/transformations/transformation_abc.py"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pymatgen.transformations.transformation_abc.AbstractTransformation.use_multiprocessing" title="Link to this definition"></a></dt>
<dd><p>Indicates whether the transformation can be applied by a
subprocessing pool. This should be overridden to return True for
transformations that the transmuter can parallelize.</p>
</dd></dl>

</dd></dl>

</section>
</section>


           </div>
          </div>
          <footer>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2011, Pymatgen Development Team.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>
